package com.icss.clothes.service.imp;

import com.icss.clothes.entity.Shopdetail;
import com.icss.clothes.mapper.ShopDetailMapper;
import com.icss.clothes.service.IShopDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ShopDetailService implements IShopDetailService {
    @Autowired
    private ShopDetailMapper shopDetailMapper;
    @Override
    public Shopdetail findAll(int c_id, int size_id, int color_id) {
        //从数据库中通过指定的商品编号、尺码编号、颜色编号查询得到商品详情信息
        Shopdetail shopdetailList= shopDetailMapper.selectAll(c_id,size_id,color_id);
        return shopdetailList;
    }

    @Override
    public Shopdetail findAllByCd_id(int cd_id) {
        //从数据库中通过指定的商品详情编号获取得到商品详情信息
        return shopDetailMapper.selectAllByCd_id(cd_id);
    }
}
